package edu.nf.takeoutdemo.model.converter;

import edu.nf.takeoutdemo.model.entity.User;
import edu.nf.takeoutdemo.model.vo.UserLoginVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 *
 * @author zjl
 * @date 2025/10/27
 */
@Mapper(componentModel = "spring")
public interface UserConverter {

    @Mappings({
            @Mapping(source = "id",target = "id"),
            @Mapping(source = "openid",target = "openid"),
            @Mapping(source = "name",target = "name"),
            @Mapping(source = "avatar",target = "avatar")
    })
    UserLoginVO toUserLoginVO(User user);
}
